Auth with more usernames and improve errors
authorAlex Crichton <alex@alexcrichton.com>
Mon, 22 Feb 2016 03:36:35 +0000 (19:36 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Thu, 25 Feb 2016 00:39:09 +0000 (16:39 -0800)
commitf66d71636379fc07275119dab8c3db674b9279ad
treefa7b32c57df76df355175d30aedc1d7a221e97f5
parent34269d0af6573a4a24b4ce3beaabf1f782a1e0d2
Auth with more usernames and improve errors

This commit is an attempt to improve the error message from failed
authentication attempts as well as attempting more usernames. Right now we only
attempt one username, but there are four different possible choices we could
select (including $USER which we weren't previously trying).

This commit tweaks a bunch of this logic and just in general refactors the
with_authentication function.

Closes #2399
src/cargo/sources/git/utils.rs
tests/test_cargo_build_auth.rs